﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace taobaoSpider
{
    public delegate void ShowErrorLogEventHandler(object sender,ShowErrorLogEventArgs e);
    public delegate void CloseSystemEventHandler(object sender);
    public delegate void WXUpdateControlValueHandler(object sender,ShowErrorLogEventArgs e);

    public class ShowErrorLogEventArgs
    {
        string _errPos = "";
        string _errMessage = "";
        string _dateTime = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString();
        TBWS.dianpu dp = new TBWS.dianpu();
        public string ErrPosition
        {
            set { this._errPos = value; }
            get { return _errPos; }
        }

        public string ErrMessage
        {
            set { this._errMessage = value; }
            get { return _errMessage; }
        }

        public string ErrDateTime
        {
            get { return _dateTime; }
        }

        public TBWS.dianpu DPInfo
        {
            get { return dp; }
            set { dp = value; }
        }

        public ShowErrorLogEventArgs()
        {
        }

        public ShowErrorLogEventArgs(string errPos, string err)
        {
            this._errPos = errPos;
            this._errMessage = err;
        }
    }

    public class MyThreadParameter
    {
        private int id;
        private string name;
        private string hangye;

        public int ID
        {
            get { return id; }
        }

        public string Name
        {
            get { return name; }
        }

        public string HangYe
        {
            get { return hangye; }
        }

        public MyThreadParameter(string hy)
        {
            this.hangye = hy;
        }

        public MyThreadParameter(int id, string name)
        {
            this.id = id;
            this.name = name;
        }
    }

    public class DesignerCjThreadParameter
    {
        int starPageNum;
        int endPageNum;

        public int StartPageNum
        {
            get { return starPageNum; }
        }

        public int EndPageNum
        {
            get { return endPageNum; }
        }

        public DesignerCjThreadParameter(int startPageNum,int endPageNum)
        {
            this.starPageNum = startPageNum;
            this.endPageNum = endPageNum;
        }
    }
}
